package com.itheima.service.impl;

import com.itheima.domain.User;
import com.itheima.mapper.UserMapper;
import com.itheima.service.UserService;
import com.itheima.utils.MapperUtils;

import java.util.List;

public class UserServiceImpl implements UserService {


    @Override
    public List<User> fingByName(String keyword) {
        try {
            UserMapper userMapper = MapperUtils.getMapper(UserMapper.class);
            return userMapper.findByName(keyword);
        }catch(Exception e){
            e.printStackTrace();
        }finally{
            MapperUtils.close();
        }
        return null;
    }
}
